package com.hizt.mmb.sms.properties;

import javafx.fxml.Initializable;
import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.net.URL;
import java.util.ResourceBundle;

/**
 * 作者：李嘉浩
 * 时间：2024-08-29-17:08
 * 功能：
 */
@Configuration
@ConfigurationProperties(prefix = "aliyun.sms")
@Data
public class SmsProperties implements InitializingBean {

    private String  endpoint;
    private String keyId;
    private String keySecret;
    private String templateCode;
    private String signName;

    public static String ENDPOINT;
    public static String KEY_ID;
    public static String KEY_SECRET;
    public static String TEMPLATE_CODE;
    public static String SIGN_NAME;



    @Override
    public void afterPropertiesSet() throws Exception {
         ENDPOINT=endpoint;
         KEY_ID=keyId;
         KEY_SECRET=keySecret;
         TEMPLATE_CODE=templateCode;
         SIGN_NAME=signName;
        System.out.println(keyId);
        System.out.println(keySecret);
        System.out.println(templateCode);
        System.out.println(signName);
    }
}
